server {
	listen 80;
	server_name  localhost;
	charset utf-8;
	error_page   500 502 503 504 /50x.html;

	# 这里可以配置前端工程
	location / {
		root /usr/share/nginx/html;
   	try_files $uri $uri/ /index.html;
	}

  location /{{= d.name }} {
    proxy_pass http://{{= d.name }}:3000;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection upgrade;
    proxy_set_header Accept-Encoding gzip;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header REMOTE-HOST $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}
}

